<div>
    <h2 class="text-center login-title">Inicio de sesión</h2>

    <form name="form" ng-submit="login()" role="form">
        <div class="form-group">
            <label for="username">Nombre de usuario</label>
            <i class="fa fa-key"></i>
            <input type="text" name="username" id="username" class="form-control" ng-model="username" required />
            <span ng-show="form.username.$dirty && form.username.$error.required" class="help-block">Nombre de usuario obligatorio</span>
        </div>
        <div class="form-group">
            <label for="password">Contraseña</label>
            <i class="fa fa-lock"></i>
            <input type="password" name="password" id="password" class="form-control" ng-model="password" required />
            <span ng-show="form.password.$dirty && form.password.$error.required" class="help-block">Contraseña obligatoria</span>
        </div>
        <div>
          <alert type="{{loginAlertType}}" close="showLoginAlert = false;" ng-show="showLoginAlert">{{loginMessage}}</alert>
        </div>
        <div class="form-actions text-right">
            <button type="submit" ng-disabled="form.$invalid || dataLoading" class="btn btn-default">Ingresar</button>
        </div>
    </form>
  </div>